In the matrix form, it is
\[ \frac{\partial}{\partial t} \left ( \rho \vec{U} \right ) + \vec{\nabla} \cdot \left ( \rho \vec{U} \otimes \vec{U} \right ) = - \vec{\nabla} p + \vec{\nabla} \cdot \vec{\vec{\tau}} \]
In the convective form, it is
\[ \rho \frac{D \vec{U}}{D t} = - \vec{\nabla} p + \vec{\nabla} \cdot \vec{\vec{\tau}} \]
where the material derivative is
\[ \frac{D}{Dt} = \frac{\partial}{\partial t} + \vec{U} \cdot \vec{\nabla} \]
The link between the conservative form and the convective form is as follows.
The outer product is defined as
\[ \vec{U} \otimes \vec{U} = \vec{U} \vec{U}^{T} \]
which is a 2nd order tensor.
Decomposition of the conservative form would be
\[ \rho \frac{\partial}{\partial t} \vec{U} + \vec{U} \frac{\partial \rho}{\partial t} + \rho \vec{\nabla} \cdot \left ( \vec{U} \otimes \vec{U} \right ) + \left ( \vec{U} \otimes \vec{U} \right ) \cdot \vec{\nabla} \rho \]
According to the definition of the outer product, we have the following relations,
\[ \begin{aligned} \vec{\nabla} \cdot \left ( \vec{U} \otimes \vec{U} \right ) &= \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) + \vec{U} \left ( \vec{\nabla} \cdot \vec{U} \right ) \\ \left ( \vec{U} \otimes \vec{U} \right ) \cdot \vec{\nabla} \rho &= \vec{U} \left ( \vec{U} \cdot \vec{\nabla} \rho \right ) \end{aligned} \]
Then decompose the conservative form to be
\[ \rho \frac{\partial}{\partial t} \vec{U} + \vec{U} \frac{\partial \rho}{\partial t} + \rho \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) + \rho \vec{U} \left ( \vec{\nabla} \cdot \vec{U} \right ) + \vec{U} \left ( \vec{U} \cdot \vec{\nabla} \rho \right ) \]
Rearrange the terms,
\[ \begin{aligned} & \rho \left ( \frac{\partial}{\partial t} \vec{U} + \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) \right ) + \vec{U} \left ( \frac{\partial \rho}{\partial t} + \rho \left ( \vec{\nabla} \cdot \vec{U} \right ) + \left ( \vec{U} \cdot \vec{\nabla} \rho \right ) \right ) \\ =& \rho \left ( \frac{\partial}{\partial t} \vec{U} + \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) \right ) + \vec{U} \left ( \frac{\partial \rho}{\partial t} + \vec{\nabla} \cdot \left ( \rho \vec{U} \right ) \right ) \end{aligned} \]
The right term is the continuity equation and thus could be removed.
Since the following relation
\[ \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) = \left ( \vec{U} \cdot \vec{\nabla} \right ) \vec{U} \]
the left term could be further manipulated to be the convective form.
The above 3 relations could be explained by the index notion of the tensor.
The divergence of the outer product is
\[ \begin{aligned} \vec{\nabla} \cdot \left ( \vec{U} \otimes \vec{U} \right ) &= \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) + \vec{U} \left ( \vec{\nabla} \cdot \vec{U} \right ) \\ \sum^{3}{j=1} \frac{\partial U_i U_j}{\partial x_j} &= \sum^{3}{j=1} \left ( U_j \frac{\partial U_i}{\partial x_j} \right ) + U_i \sum^{3}_{j=1} \frac{\partial U_j}{\partial x_j} \end{aligned} \]
The product of the outer product and the inner product is
\[ \begin{aligned} \left ( \vec{U} \otimes \vec{U} \right ) \cdot \vec{\nabla} \rho &= \vec{U} \left ( \vec{U} \cdot \vec{\nabla} \rho \right ) \\ \sum^{3}{j=1} \left ( U_i U_j \right ) \frac{\partial \rho}{\partial x_j} &= U_i \sum^{3}{j=1} \left ( U_j \frac{\partial \rho}{\partial x_j} \right ) \end{aligned} \]
The inner product of the gradient is
\[ \begin{aligned} \vec{U} \cdot \left ( \vec{\nabla} \vec{U} \right ) &= \left ( \vec{U} \cdot \vec{\nabla} \right ) \vec{U} \\ \sum^{3}{j=1} \left ( U_j \frac{\partial U_i}{\partial x_j} \right ) &= \sum^{3}{j=1} \left ( U_j \frac{\partial }{\partial x_j} \right ) U_i \end{aligned} \]
The pressure \(p\) is equal to minus the mean normal stress. Check Cauchy momentum equation.
\(\vec{\vec{\tau}}\) is the deviatoric stress tensor. For Newtonian fluid,
\[ \tau_{ij} = \mu \left ( \frac{\partial U_i}{\partial x_j} + \frac{\partial U_j}{\partial x_i} \right ) + \delta_{ij} \lambda \frac{\partial U_k}{\partial x_k} \]
where the bulk viscosity \(\lambda = -\frac{2}{3} \mu\) in the compressible fluid (which is actually hard to determine) and set to be \(0\) in the incompressible fluid.
The stress tensor is defined as
\[ \begin{aligned} \vec{\vec{\tau}} &= \begin{bmatrix} \tau_{xx} & \tau_{xy} & \tau_{xz} \\ \tau_{yx} & \tau_{yy} & \tau_{yz} \\ \tau_{zx} & \tau_{zy} & \tau_{zz} \\ \end{bmatrix} \\ &= \begin{bmatrix} 2 \mu \left ( \frac{\partial U_x}{\partial x} \right ) + \lambda \vec{\nabla} \cdot \vec{U} & \mu \left ( \frac{\partial U_x}{\partial y} + \frac{\partial U_y}{\partial x} \right ) & \mu \left ( \frac{\partial U_x}{\partial z} + \frac{\partial U_z}{\partial x} \right ) \\ \mu \left ( \frac{\partial U_y}{\partial x} + \frac{\partial U_x}{\partial y} \right ) & 2 \mu \left ( \frac{\partial U_y}{\partial y} \right ) + \lambda \vec{\nabla} \cdot \vec{U} & \mu \left ( \frac{\partial U_y}{\partial z} + \frac{\partial U_z}{\partial y} \right ) \\ \mu \left ( \frac{\partial U_z}{\partial x} + \frac{\partial U_x}{\partial z} \right ) & \mu \left ( \frac{\partial U_z}{\partial y} + \frac{\partial U_y}{\partial z} \right ) & 2 \mu \left ( \frac{\partial U_z}{\partial z} \right ) + \lambda \vec{\nabla} \cdot \vec{U} \\ \end{bmatrix} \end{aligned} \]
To obtain the wall friction, we need to project the stress tensor along the normal vector of the wall face.
\[ \begin{aligned} \vec{\vec{\tau}} \cdot \vec{n} &= \begin{bmatrix} \tau_{xx} n_x +\tau_{xy} n_y +\tau_{xz} n_z \\ \tau_{yx} n_x +\tau_{yy} n_y +\tau_{yz} n_z \\ \tau_{zx} n_x +\tau_{zy} n_y +\tau_{zz} n_z \\ \end{bmatrix} \\ &= \begin{bmatrix} \left ( 2 \mu \left ( \frac{\partial U_x}{\partial x} \right ) + \lambda \vec{\nabla} \cdot \vec{U} \right ) n_x + \mu \left ( \frac{\partial U_x}{\partial y} + \frac{\partial U_y}{\partial x} \right ) n_y + \mu \left ( \frac{\partial U_x}{\partial z} + \frac{\partial U_z}{\partial x} \right ) n_z \\ \mu \left ( \frac{\partial U_y}{\partial x} + \frac{\partial U_x}{\partial y} \right ) n_x + \left ( 2 \mu \left ( \frac{\partial U_y}{\partial y} \right ) + \lambda \vec{\nabla} \cdot \vec{U} \right ) n_y + \mu \left ( \frac{\partial U_y}{\partial z} + \frac{\partial U_z}{\partial y} \right ) n_z \\ \mu \left ( \frac{\partial U_z}{\partial x} + \frac{\partial U_x}{\partial z} \right ) n_x + \mu \left ( \frac{\partial U_z}{\partial y} + \frac{\partial U_y}{\partial z} \right ) n_y + \left ( 2 \mu \left ( \frac{\partial U_z}{\partial z} \right ) + \lambda \vec{\nabla} \cdot \vec{U} \right ) n_z \\ \end{bmatrix} \\ &= \begin{bmatrix} \mu \left ( \frac{\partial U_x}{\partial x} n_x + \frac{\partial U_x}{\partial y} n_y + \frac{\partial U_x}{\partial z} n_z \right ) + \mu \left ( \frac{\partial U_x}{\partial x} n_x + \frac{\partial U_y}{\partial x} n_y + \frac{\partial U_z}{\partial x} n_z \right ) + \lambda \vec{\nabla} \cdot \vec{U} n_x \\ \mu \left ( \frac{\partial U_y}{\partial x} n_x + \frac{\partial U_y}{\partial y} n_y + \frac{\partial U_y}{\partial z} n_z \right ) + \mu \left ( \frac{\partial U_x}{\partial y} n_x + \frac{\partial U_y}{\partial y} n_y + \frac{\partial U_z}{\partial y} n_z \right ) + \lambda \vec{\nabla} \cdot \vec{U} n_y \\ \mu \left ( \frac{\partial U_z}{\partial x} n_x + \frac{\partial U_z}{\partial y} n_y + \frac{\partial U_z}{\partial z} n_z \right ) + \mu \left ( \frac{\partial U_x}{\partial z} n_x + \frac{\partial U_y}{\partial z} n_y + \frac{\partial U_z}{\partial z} n_z \right ) + \lambda \vec{\nabla} \cdot \vec{U} n_z \\ \end{bmatrix} \\ &= \begin{bmatrix} \mu \left ( \vec{\nabla} U_x \right ) \cdot \vec{n} + \mu \frac{\partial \vec{U}}{\partial x} \cdot \vec{n} + \lambda \vec{\nabla} \cdot \vec{U} n_x \\ \mu \left ( \vec{\nabla} U_y \right ) \cdot \vec{n} + \mu \frac{\partial \vec{U}}{\partial y} \cdot \vec{n} + \lambda \vec{\nabla} \cdot \vec{U} n_y \\ \mu \left ( \vec{\nabla} U_z \right ) \cdot \vec{n} + \mu \frac{\partial \vec{U}}{\partial z} \cdot \vec{n} + \lambda \vec{\nabla} \cdot \vec{U} n_z \\ \end{bmatrix} \end{aligned} \]
For the wall friction, the bulk viscosity term could be removed since it has nothing to do with the friction. And the impermeability condition at the wall leads to \(\vec{U} \cdot \vec{n}=0\). Therefore, \(\vec{\vec{\tau}} \cdot \vec{n}\) is simplified to be
\[ \vec{\vec{\tau}} \cdot \vec{n} = \begin{bmatrix} \mu \left ( \vec{\nabla} \cdot \vec{n} \right ) U_x \\ \mu \left ( \vec{\nabla} \cdot \vec{n} \right ) U_y \\ \mu \left ( \vec{\nabla} \cdot \vec{n} \right ) U_z \\ \end{bmatrix} = \mu \left ( \vec{\nabla} \cdot \vec{n} \right ) \vec{U} \]
The wall friction is defined as
\[ \tau_w = \mu \frac{d U_{tan}}{d n} = \mu \left ( \vec{\nabla} \cdot \vec{n} \right ) \left ( \vec{U} \cdot \vec{t} \right ) \]
Here, it is shown that the wall friction \(\tau_w\) is actually the wall-parallel components of shear stress vector \(\vec{\vec{\tau}} \cdot \vec{n}\).
But what does the shear stress vector mean? Check the following figure.
The dot product of a 2nd order tensor with a direction vector is actually extracting the components of the 2nd order tensor along the direction.